404f1bb41Yl-5ZjIWnG66HDCj6OIWA xen/include/asm-x86/pda.h
4022a73diKn2Ax4-R4gzk59lm1YdDg xen/include/asm-x86/pdb.h
3ddb79c2QF5-pZGzuX4QukPCDAl59A xen/include/asm-x86/processor.h
-40cf1596bim9F9DNdV75klgRSZ6Y2A xen/include/asm-x86/ptrace.h
+40cf1596bim9F9DNdV75klgRSZ6Y2A xen/include/asm-x86/regs.h
3ddb79c2plf7ciNgoNjU-RsbUzawsw xen/include/asm-x86/rwlock.h
405b8599BsDsDwKEJLS0XipaiQW3TA xen/include/asm-x86/shadow.h
3ddb79c3Hgbb2g8CyWLMCK-6_ZVQSQ xen/include/asm-x86/smp.h
3ddb79c4HugMq7IYGxcQKFBpKwKhzA xen/include/asm-x86/types.h
40cf1596saFaHD5DC5zvrSn7CDCWGQ xen/include/asm-x86/uaccess.h
3ddb79c2ADvRmdexd9y3AYK9_NTx-Q xen/include/asm-x86/x86_32/current.h
-3ddb79c3mbqEM7QQr3zVq7NiBNhouA xen/include/asm-x86/x86_32/ptrace.h
+3ddb79c3mbqEM7QQr3zVq7NiBNhouA xen/include/asm-x86/x86_32/regs.h
3e7f358aG11EvMI9VJ4_9hD4LUO7rQ xen/include/asm-x86/x86_32/string.h
3ddb79c3M2n1ROZH6xk3HbyN4CPDqg xen/include/asm-x86/x86_32/uaccess.h
404f1b9ceJeGVaPNIENm2FkK0AgEOQ xen/include/asm-x86/x86_64/current.h
404f1b9fl6AQ_a-T1TDK3fuwTPXmHw xen/include/asm-x86/x86_64/desc.h
404f1badfXZJZ2sU8sh9PS2EZvd19Q xen/include/asm-x86/x86_64/ldt.h
-404f1bb86rAXB3aLS1vYdcqpJiEcyg xen/include/asm-x86/x86_64/ptrace.h
+404f1bb86rAXB3aLS1vYdcqpJiEcyg xen/include/asm-x86/x86_64/regs.h
40e1966azOJZfNI6Ilthe6Q-T3Hewg xen/include/asm-x86/x86_64/string.h
404f1bc4tWkB9Qr8RkKtZGW5eMQzhw xen/include/asm-x86/x86_64/uaccess.h
400304fcmRQmDdFYEzDh0wcBba9alg xen/include/public/COPYING
unsigned int apic_timer_irqs [NR_CPUS];
-void smp_apic_timer_interrupt(struct pt_regs * regs)
+void smp_apic_timer_interrupt(struct xen_regs * regs)
{
ack_APIC_irq();
#include <xen/smp.h>
#include <xen/delay.h>
#include <xen/softirq.h>
-#include <asm/ptrace.h>
+#include <asm/regs.h>
#include <asm/mc146818rtc.h>
#include <asm/system.h>
#include <asm/io.h>
#include <xen/config.h>
#include <xen/init.h>
-#include <asm/ptrace.h>
+#include <asm/regs.h>
#include <xen/errno.h>
#include <xen/sched.h>
#include <xen/irq.h>
static void __do_IRQ_guest(int irq);
-void no_action(int cpl, void *dev_id, struct pt_regs *regs) { }
+void no_action(int cpl, void *dev_id, struct xen_regs *regs) { }
static void enable_none(unsigned int irq) { }
static unsigned int startup_none(unsigned int irq) { return 0; }
spin_unlock_irqrestore(&desc->lock, flags);
}
-asmlinkage void do_IRQ(struct pt_regs regs)
+asmlinkage void do_IRQ(struct xen_regs regs)
{
#if defined(__i386__)
unsigned int irq = regs.orig_eax;
}
void audit_domains_key(unsigned char key, void *dev_id,
- struct pt_regs *regs)
+ struct xen_regs *regs)
{
open_softirq(MEMAUDIT_SOFTIRQ, audit_domains);
raise_softirq(MEMAUDIT_SOFTIRQ);
unsigned int watchdog_on = 0;
static unsigned int nmi_hz = HZ;
unsigned int nmi_perfctr_msr; /* the MSR to reset in NMI handler */
-extern void show_registers(struct pt_regs *regs);
+extern void show_registers(struct xen_regs *regs);
extern int logical_proc_id[];
alert_counter[i] = 0;
}
-void nmi_watchdog_tick (struct pt_regs * regs)
+void nmi_watchdog_tick (struct xen_regs * regs)
{
- extern void die(const char * str, struct pt_regs * regs, long err);
+ extern void die(const char * str, struct xen_regs * regs, long err);
int sum, cpu = smp_processor_id();
}
void
-pdb_linux_syscall_enter_bkpt (struct pt_regs *regs, long error_code,
+pdb_linux_syscall_enter_bkpt (struct xen_regs *regs, long error_code,
trap_info_t *ti)
{
/* set at breakpoint at the beginning of the
}
void
-pdb_linux_syscall_exit_bkpt (struct pt_regs *regs, struct pdb_context *pdb_ctx)
+pdb_linux_syscall_exit_bkpt (struct xen_regs *regs, struct pdb_context *pdb_ctx)
{
/*
we've hit an int 0x80 in a user's program, jumped into xen
#include <xen/lib.h>
#include <xen/sched.h>
-#include <asm/ptrace.h>
+#include <asm/regs.h>
#include <xen/keyhandler.h>
#include <asm/apic.h>
#include <asm/domain_page.h> /* [un]map_domain_mem */
}
void
-pdb_x86_to_gdb_regs (char *buffer, struct pt_regs *regs)
+pdb_x86_to_gdb_regs (char *buffer, struct xen_regs *regs)
{
int idx = 0;
/* at this point we allow any register to be changed, caveat emptor */
void
-pdb_gdb_to_x86_regs (struct pt_regs *regs, char *buffer)
+pdb_gdb_to_x86_regs (struct xen_regs *regs, char *buffer)
{
hex2mem(buffer, (char *)®s->eax, sizeof(regs->eax));
buffer += sizeof(regs->eax) * 2;
}
int
-pdb_process_command (char *ptr, struct pt_regs *regs, unsigned long cr3,
+pdb_process_command (char *ptr, struct xen_regs *regs, unsigned long cr3,
int sigval)
{
int length;
*/
int pdb_handle_exception(int exceptionVector,
- struct pt_regs *xen_regs)
+ struct xen_regs *xen_regs)
{
int signal = 0;
struct pdb_breakpoint* bkpt;
void __pdb_key_pressed(void)
{
- struct pt_regs *regs = (struct pt_regs *)get_execution_context();
+ struct xen_regs *regs = (struct xen_regs *)get_execution_context();
pdb_handle_exception(KEYPRESS_EXCEPTION, regs);
}
-void pdb_key_pressed(u_char key, void *dev_id, struct pt_regs *regs)
+void pdb_key_pressed(u_char key, void *dev_id, struct xen_regs *regs)
{
raise_softirq(DEBUGGER_SOFTIRQ);
}
static unsigned long wc_sec, wc_usec; /* UTC time at last 'time update'. */
static rwlock_t time_lock = RW_LOCK_UNLOCKED;
-static void timer_interrupt(int irq, void *dev_id, struct pt_regs *regs)
+static void timer_interrupt(int irq, void *dev_id, struct xen_regs *regs)
{
write_lock_irq(&time_lock);
#include <xen/errno.h>
#include <xen/mm.h>
#include <xen/console.h>
-#include <asm/ptrace.h>
+#include <asm/regs.h>
#include <xen/delay.h>
#include <xen/event.h>
#include <xen/spinlock.h>
show_trace( esp );
}
-void show_registers(struct pt_regs *regs)
+void show_registers(struct xen_regs *regs)
{
unsigned long esp;
unsigned short ss;
spinlock_t die_lock = SPIN_LOCK_UNLOCKED;
-void die(const char *str, struct pt_regs * regs, long err)
+void die(const char *str, struct xen_regs * regs, long err)
{
unsigned long flags;
spin_lock_irqsave(&die_lock, flags);
static inline void do_trap(int trapnr, char *str,
- struct pt_regs *regs,
+ struct xen_regs *regs,
long error_code, int use_error_code)
{
struct domain *p = current;
}
#define DO_ERROR_NOCODE(trapnr, str, name) \
-asmlinkage void do_##name(struct pt_regs * regs, long error_code) \
+asmlinkage void do_##name(struct xen_regs * regs, long error_code) \
{ \
do_trap(trapnr, str, regs, error_code, 0); \
}
#define DO_ERROR(trapnr, str, name) \
-asmlinkage void do_##name(struct pt_regs * regs, long error_code) \
+asmlinkage void do_##name(struct xen_regs * regs, long error_code) \
{ \
do_trap(trapnr, str, regs, error_code, 1); \
}
DO_ERROR_NOCODE(18, "machine check", machine_check)
DO_ERROR_NOCODE(19, "simd error", simd_coprocessor_error)
-asmlinkage void do_int3(struct pt_regs *regs, long error_code)
+asmlinkage void do_int3(struct xen_regs *regs, long error_code)
{
struct domain *p = current;
struct guest_trap_bounce *gtb = guest_trap_bounce+smp_processor_id();
for ( ; ; ) ;
}
-asmlinkage void do_page_fault(struct pt_regs *regs, long error_code)
+asmlinkage void do_page_fault(struct xen_regs *regs, long error_code)
{
struct guest_trap_bounce *gtb = guest_trap_bounce+smp_processor_id();
trap_info_t *ti;
smp_processor_id(), error_code, addr);
}
-asmlinkage void do_general_protection(struct pt_regs *regs, long error_code)
+asmlinkage void do_general_protection(struct xen_regs *regs, long error_code)
{
struct domain *d = current;
struct guest_trap_bounce *gtb = guest_trap_bounce+smp_processor_id();
die("general protection fault", regs, error_code);
}
-asmlinkage void mem_parity_error(struct pt_regs *regs)
+asmlinkage void mem_parity_error(struct xen_regs *regs)
{
console_force_unlock();
for ( ; ; ) ;
}
-asmlinkage void io_check_error(struct pt_regs *regs)
+asmlinkage void io_check_error(struct xen_regs *regs)
{
console_force_unlock();
for ( ; ; ) ;
}
-static void unknown_nmi_error(unsigned char reason, struct pt_regs * regs)
+static void unknown_nmi_error(unsigned char reason, struct xen_regs * regs)
{
printk("Uhhuh. NMI received for unknown reason %02x.\n", reason);
printk("Dazed and confused, but trying to continue\n");
printk("Do you have a strange power saving mode enabled?\n");
}
-asmlinkage void do_nmi(struct pt_regs * regs, unsigned long reason)
+asmlinkage void do_nmi(struct xen_regs * regs, unsigned long reason)
{
++nmi_count(smp_processor_id());
put_domain(d);
}
-asmlinkage void math_state_restore(struct pt_regs *regs, long error_code)
+asmlinkage void math_state_restore(struct xen_regs *regs, long error_code)
{
/* Prevent recursion. */
clts();
}
#ifdef XEN_DEBUGGER
-asmlinkage void do_pdb_debug(struct pt_regs *regs, long error_code)
+asmlinkage void do_pdb_debug(struct xen_regs *regs, long error_code)
{
unsigned int condition;
struct domain *tsk = current;
}
#endif
-asmlinkage void do_debug(struct pt_regs *regs, long error_code)
+asmlinkage void do_debug(struct xen_regs *regs, long error_code)
{
unsigned int condition;
struct domain *tsk = current;
}
-asmlinkage void do_spurious_interrupt_bug(struct pt_regs * regs,
+asmlinkage void do_spurious_interrupt_bug(struct xen_regs * regs,
long error_code)
{ /* nothing */ }
movl %edx,%gs
movl %esp,%edx
pushl %esi # push the error code
- pushl %edx # push the pt_regs pointer
+ pushl %edx # push the xen_regs pointer
GET_CURRENT(%ebx)
call *%edi
addl $8,%esp
}
/* Decode Reg field of a ModRM byte: return a pointer into a register block. */
-void *decode_reg(struct pt_regs *regs, u8 b)
+void *decode_reg(struct xen_regs *regs, u8 b)
{
switch ( b & 7 )
{
* we assume that the instruction itself is paged into memory (the CPU
* must have triggered this in order to decode the instruction itself).
*/
-int gpf_emulate_4gb(struct pt_regs *regs)
+int gpf_emulate_4gb(struct xen_regs *regs)
{
struct domain *d = current;
trap_info_t *ti;
}
-static void dump_timerq(u_char key, void *dev_id, struct pt_regs *regs)
+static void dump_timerq(u_char key, void *dev_id, struct xen_regs *regs)
{
struct ac_timer *t;
unsigned long flags;
}
static void show_handlers(unsigned char key, void *dev_id,
- struct pt_regs *regs)
+ struct xen_regs *regs)
{
int i;
printk("'%c' pressed -> showing installed handlers\n", key);
static void dump_registers(unsigned char key, void *dev_id,
- struct pt_regs *regs)
+ struct xen_regs *regs)
{
- extern void show_registers(struct pt_regs *regs);
+ extern void show_registers(struct xen_regs *regs);
printk("'%c' pressed -> dumping registers\n", key);
show_registers(regs);
}
static void halt_machine(unsigned char key, void *dev_id,
- struct pt_regs *regs)
+ struct xen_regs *regs)
{
printk("'%c' pressed -> rebooting machine\n", key);
machine_restart(NULL);
}
void do_task_queues(unsigned char key, void *dev_id,
- struct pt_regs *regs)
+ struct xen_regs *regs)
{
unsigned long flags;
struct domain *d;
}
extern void dump_runq(unsigned char key, void *dev_id,
- struct pt_regs *regs);
+ struct xen_regs *regs);
extern void print_sched_histo(unsigned char key, void *dev_id,
- struct pt_regs *regs);
+ struct xen_regs *regs);
extern void reset_sched_histo(unsigned char key, void *dev_id,
- struct pt_regs *regs);
+ struct xen_regs *regs);
#ifndef NDEBUG
extern void audit_domains_key(unsigned char key, void *dev_id,
- struct pt_regs *regs);
+ struct xen_regs *regs);
#endif
#ifdef PERF_COUNTERS
extern void perfc_printall(unsigned char key, void *dev_id,
- struct pt_regs *regs);
+ struct xen_regs *regs);
extern void perfc_reset(unsigned char key, void *dev_id,
- struct pt_regs *regs);
+ struct xen_regs *regs);
#endif
void initialize_keytable(void)
struct perfcounter_t perfcounters;
-void perfc_printall(u_char key, void *dev_id, struct pt_regs *regs)
+void perfc_printall(u_char key, void *dev_id, struct xen_regs *regs)
{
int i, j, sum;
s_time_t now = NOW();
}
}
-void perfc_reset(u_char key, void *dev_id, struct pt_regs *regs)
+void perfc_reset(u_char key, void *dev_id, struct xen_regs *regs)
{
int i, j, sum;
s_time_t now = NOW();
}
-void dump_runq(u_char key, void *dev_id, struct pt_regs *regs)
+void dump_runq(u_char key, void *dev_id, struct xen_regs *regs)
{
s_time_t now = NOW();
int i;
}
#if defined(WAKE_HISTO) || defined(BLOCKTIME_HISTO)
-void print_sched_histo(u_char key, void *dev_id, struct pt_regs *regs)
+void print_sched_histo(u_char key, void *dev_id, struct xen_regs *regs)
{
int i, j, k;
for ( k = 0; k < smp_num_cpus; k++ )
}
}
-void reset_sched_histo(u_char key, void *dev_id, struct pt_regs *regs)
+void reset_sched_histo(u_char key, void *dev_id, struct xen_regs *regs)
{
int i, j;
for ( j = 0; j < smp_num_cpus; j++ )
schedule_data[j].hist[i] = 0;
}
#else
-void print_sched_histo(u_char key, void *dev_id, struct pt_regs *regs)
+void print_sched_histo(u_char key, void *dev_id, struct xen_regs *regs)
{
}
-void reset_sched_histo(u_char key, void *dev_id, struct pt_regs *regs)
+void reset_sched_histo(u_char key, void *dev_id, struct xen_regs *regs)
{
}
#endif
input_str[xen_rx], opt_conswitch[0], input_str[!xen_rx]);
}
-static void __serial_rx(unsigned char c, struct pt_regs *regs)
+static void __serial_rx(unsigned char c, struct xen_regs *regs)
{
key_handler *handler;
struct domain *p;
}
}
-static void serial_rx(unsigned char c, struct pt_regs *regs)
+static void serial_rx(unsigned char c, struct xen_regs *regs)
{
static int switch_code_count = 0;
* PRIVATE FUNCTIONS
*/
-static void uart_rx(uart_t *uart, struct pt_regs *regs)
+static void uart_rx(uart_t *uart, struct xen_regs *regs)
{
unsigned char c;
}
}
-static void serial_interrupt(int irq, void *dev_id, struct pt_regs *regs)
+static void serial_interrupt(int irq, void *dev_id, struct xen_regs *regs)
{
uart_rx((uart_t *)dev_id, regs);
}
#define __ASM_APIC_H
#include <xen/config.h>
-#include <asm/ptrace.h>
+#include <asm/regs.h>
#include <asm/apicdef.h>
#include <asm/system.h>
extern void init_bsp_APIC (void);
extern void setup_local_APIC (void);
extern void init_apic_mappings (void);
-extern void smp_local_timer_interrupt (struct pt_regs * regs);
+extern void smp_local_timer_interrupt (struct xen_regs * regs);
extern void setup_APIC_clocks (void);
extern void setup_apic_nmi_watchdog (void);
-extern inline void nmi_watchdog_tick (struct pt_regs * regs);
+extern inline void nmi_watchdog_tick (struct xen_regs * regs);
extern int APIC_init_uniprocessor (void);
extern void disable_APIC_timer(void);
extern void enable_APIC_timer(void);
#define BUILD_SMP_TIMER_INTERRUPT(x,v) XBUILD_SMP_TIMER_INTERRUPT(x,v)
#define XBUILD_SMP_TIMER_INTERRUPT(x,v) \
-asmlinkage void x(struct pt_regs * regs); \
+asmlinkage void x(struct xen_regs * regs); \
asmlinkage void call_##x(void); \
__asm__( \
"\n"__ALIGN_STR"\n" \
#ifndef __PDB_H__
#define __PDB_H__
-#include <asm/ptrace.h>
+#include <asm/regs.h>
#include <xen/list.h>
#include <public/dom0_ops.h>
#include <public/xen.h> /* for domain id */
/* External entry points. */
extern int pdb_handle_exception(int exceptionVector,
- struct pt_regs *xen_regs);
+ struct xen_regs *xen_regs);
extern void pdb_do_debug(dom0_op_t *op);
/* PDB Context. */
int pid, unsigned long cr3);
void pdb_linux_set_values(char *buffer, int length, unsigned long address,
int pid, unsigned long cr3);
-void pdb_linux_syscall_enter_bkpt (struct pt_regs *regs, long error_code,
+void pdb_linux_syscall_enter_bkpt (struct xen_regs *regs, long error_code,
trap_info_t *ti);
-void pdb_linux_syscall_exit_bkpt (struct pt_regs *regs,
+void pdb_linux_syscall_exit_bkpt (struct xen_regs *regs,
struct pdb_context *pdb_ctx);
#endif /* __PDB_H__ */
};
extern struct guest_trap_bounce guest_trap_bounce[];
-extern int gpf_emulate_4gb(struct pt_regs *regs);
+extern int gpf_emulate_4gb(struct xen_regs *regs);
struct mm_struct {
/*
+++ /dev/null
-
-#ifdef __x86_64__
-#include <asm/x86_64/ptrace.h>
-#else
-#include <asm/x86_32/ptrace.h>
-#endif
--- /dev/null
+
+#ifdef __x86_64__
+#include <asm/x86_64/regs.h>
+#else
+#include <asm/x86_32/regs.h>
+#endif
+++ /dev/null
-#ifndef _I386_PTRACE_H
-#define _I386_PTRACE_H
-
-struct pt_regs {
- long ebx;
- long ecx;
- long edx;
- long esi;
- long edi;
- long ebp;
- long eax;
- int xds;
- int xes;
- int xfs;
- int xgs;
- long orig_eax;
- long eip;
- int xcs;
- long eflags;
- long esp;
- int xss;
-};
-
-enum EFLAGS {
- EF_CF = 0x00000001,
- EF_PF = 0x00000004,
- EF_AF = 0x00000010,
- EF_ZF = 0x00000040,
- EF_SF = 0x00000080,
- EF_TF = 0x00000100,
- EF_IE = 0x00000200,
- EF_DF = 0x00000400,
- EF_OF = 0x00000800,
- EF_IOPL = 0x00003000,
- EF_IOPL_RING0 = 0x00000000,
- EF_IOPL_RING1 = 0x00001000,
- EF_IOPL_RING2 = 0x00002000,
- EF_NT = 0x00004000, /* nested task */
- EF_RF = 0x00010000, /* resume */
- EF_VM = 0x00020000, /* virtual mode */
- EF_AC = 0x00040000, /* alignment */
- EF_VIF = 0x00080000, /* virtual interrupt */
- EF_VIP = 0x00100000, /* virtual interrupt pending */
- EF_ID = 0x00200000, /* id */
-};
-
-#endif
--- /dev/null
+#ifndef _I386_REGS_H
+#define _I386_REGS_H
+
+struct xen_regs {
+ long ebx;
+ long ecx;
+ long edx;
+ long esi;
+ long edi;
+ long ebp;
+ long eax;
+ int xds;
+ int xes;
+ int xfs;
+ int xgs;
+ long orig_eax;
+ long eip;
+ int xcs;
+ long eflags;
+ long esp;
+ int xss;
+};
+
+enum EFLAGS {
+ EF_CF = 0x00000001,
+ EF_PF = 0x00000004,
+ EF_AF = 0x00000010,
+ EF_ZF = 0x00000040,
+ EF_SF = 0x00000080,
+ EF_TF = 0x00000100,
+ EF_IE = 0x00000200,
+ EF_DF = 0x00000400,
+ EF_OF = 0x00000800,
+ EF_IOPL = 0x00003000,
+ EF_IOPL_RING0 = 0x00000000,
+ EF_IOPL_RING1 = 0x00001000,
+ EF_IOPL_RING2 = 0x00002000,
+ EF_NT = 0x00004000, /* nested task */
+ EF_RF = 0x00010000, /* resume */
+ EF_VM = 0x00020000, /* virtual mode */
+ EF_AC = 0x00040000, /* alignment */
+ EF_VIF = 0x00080000, /* virtual interrupt */
+ EF_VIP = 0x00100000, /* virtual interrupt pending */
+ EF_ID = 0x00200000, /* id */
+};
+
+#endif
+++ /dev/null
-#ifndef _X86_64_PTRACE_H
-#define _X86_64_PTRACE_H
-
-#if defined(__ASSEMBLY__) || defined(__FRAME_OFFSETS)
-#define R15 0
-#define R14 8
-#define R13 16
-#define R12 24
-#define RBP 36
-#define RBX 40
-/* arguments: interrupts/hypercalls only save upto here*/
-#define R11 48
-#define R10 56
-#define R9 64
-#define R8 72
-#define RAX 80
-#define RCX 88
-#define RDX 96
-#define RSI 104
-#define RDI 112
-#define ORIG_RAX 120 /* = ERROR */
-/* end of arguments */
-/* cpu exception frame or undefined in case of fast hypercall. */
-#define RIP 128
-#define CS 136
-#define EFLAGS 144
-#define RSP 152
-#define SS 160
-#define ARGOFFSET R11
-#endif /* __ASSEMBLY__ */
-
-/* top of stack page */
-#define FRAME_SIZE 168
-
-#define PTRACE_SETOPTIONS 21
-
-/* options set using PTRACE_SETOPTIONS */
-#define PTRACE_O_TRACESYSGOOD 0x00000001
-
-/* Dummy values for ptrace */
-#define FS 1000
-#define GS 1008
-
-#ifndef __ASSEMBLY__
-
-struct pt_regs {
- unsigned long r15;
- unsigned long r14;
- unsigned long r13;
- unsigned long r12;
- unsigned long rbp;
- unsigned long rbx;
-/* arguments: non interrupts/hypercalls only save upto here*/
- unsigned long r11;
- unsigned long r10;
- unsigned long r9;
- unsigned long r8;
- unsigned long rax;
- unsigned long rcx;
- unsigned long rdx;
- unsigned long rsi;
- unsigned long rdi;
- unsigned long orig_rax;
-/* end of arguments */
-/* cpu exception frame or undefined */
- unsigned long rip;
- unsigned long cs;
- unsigned long eflags;
- unsigned long rsp;
- unsigned long ss;
-/* top of stack page */
-};
-
-#endif
-
-/* Arbitrarily choose the same ptrace numbers as used by the Sparc code. */
-#define PTRACE_GETREGS 12
-#define PTRACE_SETREGS 13
-#define PTRACE_GETFPREGS 14
-#define PTRACE_SETFPREGS 15
-#define PTRACE_GETFPXREGS 18
-#define PTRACE_SETFPXREGS 19
-
-#if !defined(__ASSEMBLY__)
-
-#define instruction_pointer(regs) ((regs)->rip)
-extern void show_regs(struct pt_regs *);
-
-enum {
- EF_CF = 0x00000001,
- EF_PF = 0x00000004,
- EF_AF = 0x00000010,
- EF_ZF = 0x00000040,
- EF_SF = 0x00000080,
- EF_TF = 0x00000100,
- EF_IE = 0x00000200,
- EF_DF = 0x00000400,
- EF_OF = 0x00000800,
- EF_IOPL = 0x00003000,
- EF_IOPL_RING0 = 0x00000000,
- EF_IOPL_RING1 = 0x00001000,
- EF_IOPL_RING2 = 0x00002000,
- EF_NT = 0x00004000, /* nested task */
- EF_RF = 0x00010000, /* resume */
- EF_VM = 0x00020000, /* virtual mode */
- EF_AC = 0x00040000, /* alignment */
- EF_VIF = 0x00080000, /* virtual interrupt */
- EF_VIP = 0x00100000, /* virtual interrupt pending */
- EF_ID = 0x00200000, /* id */
-};
-
-#endif
-
-#endif
--- /dev/null
+#ifndef _X86_64_REGS_H
+#define _X86_64_REGS_H
+
+#if defined(__ASSEMBLY__) || defined(__FRAME_OFFSETS)
+#define R15 0
+#define R14 8
+#define R13 16
+#define R12 24
+#define RBP 36
+#define RBX 40
+/* arguments: interrupts/hypercalls only save upto here*/
+#define R11 48
+#define R10 56
+#define R9 64
+#define R8 72
+#define RAX 80
+#define RCX 88
+#define RDX 96
+#define RSI 104
+#define RDI 112
+#define ORIG_RAX 120 /* = ERROR */
+/* end of arguments */
+/* cpu exception frame or undefined in case of fast hypercall. */
+#define RIP 128
+#define CS 136
+#define EFLAGS 144
+#define RSP 152
+#define SS 160
+#define ARGOFFSET R11
+#endif /* __ASSEMBLY__ */
+
+/* top of stack page */
+#define FRAME_SIZE 168
+
+#define PTRACE_SETOPTIONS 21
+
+/* options set using PTRACE_SETOPTIONS */
+#define PTRACE_O_TRACESYSGOOD 0x00000001
+
+/* Dummy values for ptrace */
+#define FS 1000
+#define GS 1008
+
+#ifndef __ASSEMBLY__
+
+struct xen_regs {
+ unsigned long r15;
+ unsigned long r14;
+ unsigned long r13;
+ unsigned long r12;
+ unsigned long rbp;
+ unsigned long rbx;
+/* arguments: non interrupts/hypercalls only save upto here*/
+ unsigned long r11;
+ unsigned long r10;
+ unsigned long r9;
+ unsigned long r8;
+ unsigned long rax;
+ unsigned long rcx;
+ unsigned long rdx;
+ unsigned long rsi;
+ unsigned long rdi;
+ unsigned long orig_rax;
+/* end of arguments */
+/* cpu exception frame or undefined */
+ unsigned long rip;
+ unsigned long cs;
+ unsigned long eflags;
+ unsigned long rsp;
+ unsigned long ss;
+/* top of stack page */
+};
+
+#endif
+
+/* Arbitrarily choose the same ptrace numbers as used by the Sparc code. */
+#define PTRACE_GETREGS 12
+#define PTRACE_SETREGS 13
+#define PTRACE_GETFPREGS 14
+#define PTRACE_SETFPREGS 15
+#define PTRACE_GETFPXREGS 18
+#define PTRACE_SETFPXREGS 19
+
+#if !defined(__ASSEMBLY__)
+
+#define instruction_pointer(regs) ((regs)->rip)
+extern void show_regs(struct xen_regs *);
+
+enum {
+ EF_CF = 0x00000001,
+ EF_PF = 0x00000004,
+ EF_AF = 0x00000010,
+ EF_ZF = 0x00000040,
+ EF_SF = 0x00000080,
+ EF_TF = 0x00000100,
+ EF_IE = 0x00000200,
+ EF_DF = 0x00000400,
+ EF_OF = 0x00000800,
+ EF_IOPL = 0x00003000,
+ EF_IOPL_RING0 = 0x00000000,
+ EF_IOPL_RING1 = 0x00001000,
+ EF_IOPL_RING2 = 0x00002000,
+ EF_NT = 0x00004000, /* nested task */
+ EF_RF = 0x00010000, /* resume */
+ EF_VM = 0x00020000, /* virtual mode */
+ EF_AC = 0x00040000, /* alignment */
+ EF_VIF = 0x00080000, /* virtual interrupt */
+ EF_VIP = 0x00100000, /* virtual interrupt pending */
+ EF_ID = 0x00200000, /* id */
+};
+
+#endif
+
+#endif
#include <xen/config.h>
#include <xen/spinlock.h>
-#include <asm/ptrace.h>
+#include <asm/regs.h>
#include <asm/hardirq.h>
struct irqaction
{
- void (*handler)(int, void *, struct pt_regs *);
+ void (*handler)(int, void *, struct xen_regs *);
const char *name;
void *dev_id;
};
extern void free_irq(unsigned int);
extern hw_irq_controller no_irq_type;
-extern void no_action(int cpl, void *dev_id, struct pt_regs *regs);
+extern void no_action(int cpl, void *dev_id, struct xen_regs *regs);
struct domain;
extern int pirq_guest_unmask(struct domain *p);
#include <xen/sched.h>
typedef void key_handler(unsigned char key, void *dev_id,
- struct pt_regs *regs);
+ struct xen_regs *regs);
extern void add_key_handler(unsigned char key,
key_handler *handler, char *desc);
#include <xen/config.h>
#include <xen/types.h>
#include <xen/spinlock.h>
-#include <asm/ptrace.h>
+#include <asm/regs.h>
#include <xen/smp.h>
#include <asm/page.h>
#include <asm/processor.h>
#ifndef __XEN_SERIAL_H__
#define __XEN_SERIAL_H__
-#include <asm/ptrace.h>
+#include <asm/regs.h>
/* 'Serial handles' are comprise the following fields. */
#define SERHND_IDX (1<<0) /* COM1 or COM2? */
int parse_serial_handle(char *conf);
/* Register a character-receive hook on the specified COM port. */
-typedef void (*serial_rx_fn)(unsigned char, struct pt_regs *);
+typedef void (*serial_rx_fn)(unsigned char, struct xen_regs *);
void serial_set_rx_handler(int handle, serial_rx_fn fn);
/* Transmit a single character via the specified COM port. */